const { ErrorModel } = require("../model/resModel");
module.exports = async (ctx, next) => {
    if (ctx.session.userName) {
        await next();
        return
    } else {
        ctx.body = new ErrorModel('请先登录');
    }
}